﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;


namespace LynxBlogAPI.Models.Mapping
{
    public class MediaObjectDataMap : EntityTypeConfiguration<MediaObjectData>
    {
        public MediaObjectDataMap()
        {
            this.HasKey(t => t.objectid);

            this.Property(t => t.objectid).HasColumnName("ObjectId").HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);
            this.Property(t => t.username).HasColumnName("UserName").HasMaxLength(50).IsRequired();
            this.Property(t => t.name).HasColumnName("Name").HasMaxLength(250).IsRequired();
            this.Property(t => t.type).HasColumnName("Type").HasMaxLength(100).IsRequired();
            this.Property(t => t.bits).HasColumnName("Bits").IsRequired();
            this.ToTable("tblMediaObjectData");
        }
    }
}